﻿<%@ Page Title="" Language="C#" MasterPageFile="~/JobMainMaster.Master" AutoEventWireup="true" CodeBehind="ListofJobs.aspx.cs" Inherits="HRdex_Final.WebForm1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <script runat="Server" type="text/C#">
        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        public static AjaxControlToolkit.Slide[] GetSlides()
        {
            AjaxControlToolkit.Slide[] imgSlide = new AjaxControlToolkit.Slide[4];
            
            imgSlide[0] = new AjaxControlToolkit.Slide("Images/about1.jpg", "adu1", "1");
            imgSlide[1] = new AjaxControlToolkit.Slide("Images/about2.jpg", "adu2", "2");
            imgSlide[2] = new AjaxControlToolkit.Slide("Images/about3.jpg", "adu3", "3");
            imgSlide[3] = new AjaxControlToolkit.Slide("Images/about4.jpg", "adu4", "4");
            return(imgSlide);
        }
    </script>

    <div style='float:left;'>
    <asp:Image ID="img1" runat="server" CssClass="Image" width="400px" Height="400px" ImageUrl="~/Images/about1.jpg" />
        <asp:SlideShowExtender ID="SlideShowExtender2" runat="server"
            BehaviorID="SSBehaviorID"
            TargetControlID="img1"
            SlideShowServiceMethod="GetSlides"
            AutoPlay="true"
            Loop="true" >

        </asp:SlideShowExtender>
</div>


<div class="box" align="center">
    <h1 style="color: rgb(37, 75, 124); font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; font-size: 25px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
        Job Openings</h1>
We currently have job openings for the following positions:
<br />
<br />
    <asp:GridView ID="gvJobs" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="JobID" DataSourceID="Jobs">
        <Columns>
         <asp:TemplateField>
<ItemTemplate> 
<asp:HyperLink ID="lnkSelect" runat='server' NavigateUrl='<%# String.Format("~/Applicants.aspx?JobID={0}", Eval("JobID")) %>'>Apply</asp:HyperLink> 
</ItemTemplate> 
</asp:TemplateField>
            <asp:BoundField DataField="JobID" HeaderText="JobID" InsertVisible="False" 
                ReadOnly="True" SortExpression="JobID" Visible="False" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" Visible="False" />
            <asp:BoundField DataField="Skills" HeaderText="Skills" 
                SortExpression="Skills" />
            <asp:BoundField DataField="DatePosted" HeaderText="Date Posted" 
                SortExpression="DatePosted" />
            <asp:BoundField DataField="JobType" HeaderText="Job Type" 
                SortExpression="JobType" />
            <asp:BoundField DataField="EmployeesID" HeaderText="EmployeesID" 
                SortExpression="EmployeesID" Visible="False" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="Jobs" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
        SelectCommand="SELECT * FROM [catJobTitle]"></asp:SqlDataSource>
</div>
</asp:Content>
